package org.pockito.dctmpersistence.testmodel;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

import org.pockito.dmspersistence.Attribute;
import org.pockito.dmspersistence.DmsEntity;
import org.pockito.dmspersistence.DmsType;
import org.pockito.dmspersistence.Embedded;

@DmsEntity
@DmsType(name="dm_sysobject")
public class SimpleSysObject extends PersistedObject {

	@Attribute(name = "object_name")
	private String name;
	
	private String title;
	
	@Attribute(name="r_creation_date", readonly=true)
	private Date created;
	
	@Attribute(name="r_content_size", readonly=true)
	private int contentSize;
	
	@Attribute(name="i_has_folder", readonly=true) private boolean hasFolder;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	// FIXME: r_version_label is readonly but can be modified (mark api)
	@Embedded
	@Attribute(name = "r_version_label", readonly=true)
	protected Collection<String> versionLabels = new ArrayList<String>();
	
	public Collection<String> getVersionLabels() {
		return versionLabels;
	}

	public void setVersionLabels(Collection<String> versionLabels) {
		this.versionLabels = versionLabels;
	}

	public int getContentSize() {
		return contentSize;
	}

	public void setContentSize(int contentSize) {
		this.contentSize = contentSize;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public boolean isHasFolder() {
		return hasFolder;
	}

	public void setHasFolder(boolean hasFolder) {
		this.hasFolder = hasFolder;
	}

}
